package com.jiezhuo.controller.jzg;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jiezhuo.entity.jzg.DmGjdq;
import com.jiezhuo.entity.jzg.DmMz;
import com.jiezhuo.entity.jzg.DmSfzjlx;
import com.jiezhuo.entity.jzg.DmZzmm;
import com.jiezhuo.service.jzg.DmGjdqService;
import com.jiezhuo.service.jzg.DmMzService;
import com.jiezhuo.service.jzg.DmSfzjlxService;
import com.jiezhuo.service.jzg.DmZzmmService;
import com.jiezhuo.utils.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@Api(tags = "字典表")
@RequestMapping("/jzg-new-menu")
public class DmController {
    @Autowired
    DmSfzjlxService dmSfzjlxService;
    @Autowired
    DmGjdqService dmGjdqService;
    @Autowired
    DmMzService dmMzService;
    @Autowired
    DmZzmmService dmZzmmService;
    @ApiOperation("获取身份证类型")
    @GetMapping("GetSfzlx")
    public R GetSfzlx(){
        List<DmSfzjlx> dmSfzjlxes = dmSfzjlxService.getBaseMapper().selectList(null);
        return R.ok().data("sfzlx",dmSfzjlxes);
    }
    @ApiOperation("获取民族")
    @GetMapping("GetMz")
    public R GetMz(){
        List<DmMz> dmSfzjlxes = dmMzService.getBaseMapper().selectList(null);
        return R.ok().data("sfzlx",dmSfzjlxes);
    }
    @ApiOperation("获取国家列表")
    @GetMapping("GetCountry")
    public R GetCountry(){
        List<DmGjdq> dmGjdqs = dmGjdqService.getBaseMapper().selectList(null);
        return R.ok().data("sfzlx",dmGjdqs);
    }
    @ApiOperation("获取政治面貌")
    @GetMapping("GetZzmm")
    public R GetZzmm(){
        List<DmZzmm> dmZzmms = dmZzmmService.getBaseMapper().selectList(null);
        return R.ok().data("sfzlx",dmZzmms);
    }



}
